package com.niyue.sandbox.invokevis;

import java.util.List;

public interface TreeNode {
	public String getMethodName();
	public void setMethodName(String methodName);
	public int getLevel();
	public void setLevel(int level);
	public List<TreeNode> getChildren();
	/**
	 * Add a child node for this tree node.
	 * @param childNode child node of this tree node
	 */
	public void addChild(TreeNode childNode);
	/**
	 * Output as plain text format of this tree node.
	 * If this is a root node, level is zero.
	 * @return the plain text format of this tree node 
	 */
	public String toPlainText();
	/**
	 * Output as Graphviz's dot format.
	 * @return a string in Graphviz's dot format.
	 */
	public String toDot();
	/**
	 * Output as Javascript tree in html
	 * @return a string of html with embedded javascript
	 */
	public String toHtml();
	/**
	 * Output as xml which can be visualized by SpringGraph
	 * @return a string of xml format
	 */
	public String toXml();
	/**
	 * get the node node in dot file
	 * @return the name of the node
	 */
	public String getNodeName();
}
